import request from '@/utils/request'

// 查询成交记录管理列表
export function listDealrecord(query) {
  return request({
    url: '/dealrecord/dealrecord/list',
    method: 'get',
    params: query
  })
}

// 查看审核情况
export function getAuditSituation(query) {
  return request({
    url: '/dealrecord/dealrecord/getAuditSituation',
    method: 'get',
    params: query
  })
}

// 查询成交记录管理详细
export function getDealrecord(id) {
  return request({
    url: '/dealrecord/dealrecord/' + id,
    method: 'get'
  })
}

// 新增成交记录管理
export function addDealrecord(data) {
  return request({
    url: '/dealrecord/dealrecord',
    method: 'post',
    data: data
  })
}

// 修改成交记录管理
export function updateDealrecord(data) {
  console.log(data)
  return request({
    url: '/dealrecord/dealrecord/pc/updateAuditStatus?id='+data.id+'&auditStatus='+data.auditStatus+'&reason='+data.reason,
    method: 'get',
    data: data
  })
}

// 删除成交记录管理
export function delDealrecord(id) {
  return request({
    url: '/dealrecord/dealrecord/' + id,
    method: 'delete'
  })
}

// 导出成交记录管理
export function exportDealrecord(query) {
  return request({
    url: '/dealrecord/dealrecord/export',
    method: 'get',
    params: query
  })

}

// 查看部门列表
export function deptList() {
  return request({
    url: '/system/dept/list',
    method: 'get'
  })
}
